<div class="panel panel-primary">
    <!--图片标题-->
    <div class="panel-heading">
        <h2 class="panel-title">{{image.title}}</h2>
    </div>

    <!--图片描述跟图片-->
    <div class="panle-body">
        <p>{{image.description}}</p>
        <div class="col-md-12 text-center">
            <img src="/public/upload{{image.filename}}"
                 class="img-thumbnail">
        </div>
    </div>

    <div class="panel-footer">
        <div class="row">
            <div class="col-md-8">
                <button class="btn btn-success" id="btn-like"
                        data-id="{{image.uniqueId}}">
                    <i class="fa fa-heart">点赞</i>
                    <strong class="likes-count">{{image.likes}}</strong>
                    &nbsp; - &nbsp; 发布：<em class="text-muted">{{timeago image.timestamp}}</em>

                </button>
            </div>
        </div>
    </div>


</div>


<!--图片评论功能-->
<div class="panel panle-default">
    <div class="panel-heading">
        <div class="row">
            <div class="col-md-8">
                <strong class="panel-title">评论</strong>
            </div>

            <div class="col-md-4 text-right">
                <button class="btn btn-default btn-sm" id="btn-comment" data-id="{{image.uniqueId}}">
                    <i class="fa fa-comments-o">发布评论</i>
                </button>
            </div>
        </div>
    </div>

    <div class="panel-body">
        <blockquote id="post-comment">
            <div class="row">
                <form method="post" action="/images/{{images.uniqueId}}/comment">
                    <div class="form-group col-sm-12">
                        <label class="col-sm-2 control-label" for="name">名字：</label>
                        <div class="col-sm-10">
                            <input class="form-control" type="text" name="name" />
                        </div>
                    </div>

                    <div class="form-group col-sm-12">
                        <label class="col-sm-2 control-label" for="email">邮箱:</label>
                        <div class="col-sm-10">
                            <input class="form-control" type="text" name="email" />
                        </div>
                    </div>

                    <div class="form-group col-sm-12">
                        <label class="col-sm-2 control-label" for="comment">评论：</label>
                        <div class="col-sm-10">
                            <textarea class="form-control" name="comment" rows="2"></textarea>
                        </div>
                    </div>

                    <div class="form-group col-sm-12">
                        <div class="col-sm-12 text-right">
                            <button type="submit" id="comment-btn" class="btn btn-success" type="button">
                                <i class="fa fa-comment"></i>发布
                            </button>
                        </div>
                    </div>
                </form>
            </div>
        </blockquote>

        <ul class="media-list">
            {{#each comments}}
                <li class="media">
                    <!--用户头像-->
                    <a class="pull-left" href="#">
                        <img class="media-object img-circle"
                             src="http://www.gravatar.com/avatar/{{gravatar}}?d=monsterid&s=45" />
                    </a>

                    <!--评论-->
                    <div class="media-body">
                        {{comment}}
                        <br /><strong class="media-heading">{{name}}</strong>
                        <small class="text-muted">{{timeago timestamp}}</small>
                    </div>
                </li>
            {{/each}}
        </ul>
    </div>
</div>
